package com.shunli.cterminal.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.examples.core.mybatis.base.BaseSafeEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品渠道
 */
@Data
@TableName("system_goods_channel")
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Builder
public class SystemGoodsChannel extends BaseSafeEntity {

    private static final long serialVersionUID = 7505666456764316564L;

    /**
     * PRIMARY KEY
     */
    @TableId(type=IdType.ASSIGN_ID)
    private Long id;

    /**
     * 商城编码
     */
    private String mallCode;

    /**
     * 商品编号
     */
    private Long goodsId;

    /**
     * 展示价格
     */
    private BigDecimal displayPrice;

    /**
     * 建议销售价
     */
    private BigDecimal sellingPrice;
    /**
     * 最低销售价
     */
    private BigDecimal minSellingPrice;
    /**
     * 最高销售价
     */
    private BigDecimal maxSellingPrice;
    /**
     * 区间范围
     */
    private String goodsRange;
    /**
     * 最小百分比
     */
    private BigDecimal minPercent;
    /**
     * 最大百分比
     */
    private BigDecimal maxPercent;
    /**
     * 备注
     */
    private String notes;

    /**
     * 启用状态
     */
    private String status;

    /**
     * 价格规则更新时间
     */
    private LocalDateTime ruleUpdateTime;

    /**
     * 商品内容
     */
    private String shopBody;

    private String goodsName;

//    private BigDecimal salePrice;

    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String imgUrl;

    private String title;

//    private BigDecimal originalPrice;

    private String styleName;

    private String skuId;

    private String mallId;

    private String goodsDesc;

    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String coverImg;
    @Schema(description = "标签分组:  1：一线、2：二线:3：其他，0：未知")
    private Integer label;

}
